package br.com.kaetec.views;

import java.util.ArrayList;

import br.com.kaetec.dao.ClienteDAO;
import br.com.kaetec.dao.ConnectionFactory;
import br.com.kaetec.entities.Cliente;
import br.com.kaetec.entities.Contato;
import br.com.kaetec.entities.ContatoType;
import br.com.kaetec.entities.SexoType;

public class TesteBD {

	public static void main(String[] args) {
		
		Cliente cli = new Cliente("Sergio", "41248609x", "23071530803", SexoType.M);		
		ArrayList<Contato> contatos = new ArrayList<Contato>();
		
		contatos.add( new Contato(ContatoType.B, "98540-6889" ) );		
		contatos.add( new Contato(ContatoType.A, "4332-7582" ) );
		contatos.add( new Contato(ContatoType.C, "sergio.staff@gmail.com" ) );
				
		cli.setContato(contatos);
		
		ConnectionFactory conn = new ConnectionFactory("BD_MYSQL");
		conn.checkTables();
		
		ClienteDAO clienteBD = new ClienteDAO();
//		clienteBD.mantemCliente(cli);
		
//		System.out.println( cli.getNome());
//		System.out.println( cli.getSexo().getDescricao());
//		System.out.println("contatos");
//		
//		for( int i = 0; i < cli.getContato().size(); i++) {
//			System.out.println( cli.getContato().get(i).getTipo().getDescricao() + ": " + cli.getContato().get(i).getConteudo());
//		}
		
	}

}
